home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 41
/
Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso
/
-seriously_amiga-
/
graphics
/
xipaintmodule
/
makeanim.rx
< prev
next >
Wrap
Text File
|
1999-04-19
|
2KB
|
88 lines
/* MakeAnim.rx © by Helmut Hoffmann 1995 */
/* Make HHsYUVSq animation from a directory of pictures */
/* with XiPaint */
OPTIONS RESULTS
CLOSE(STDERR)
win=OPEN(STDERR,'NIL:')
CLOSE(STDOUT)
win=OPEN(STDOUT,'NIL:')
OPTIONS FAILAT 21
address command
'version hhsxipaintmodkey.library >NIL:'
if rc~=0 then demo=1
else demo=0
CLOSE(STDOUT)
win=OPEN(STDOUT,'CON:0/50//130/MakeAnim.rx/CLOSE')
if demo=1 then say "Demo version creates animation in greyscale only!"
if ~SHOW('p','xipaint') then do
say "This script needs a running XiPaint and"
say "HHsXiPaintMod.xio to create animations"
'wait 5'
exit
end
if EXISTS('/modules/hhsxipaintmod.xio')=1 then xiopath='/modules/'
else if EXISTS('modules/hhsxipaintmod.xio')=1 then xiopath='modules/'
else if EXISTS('hhsxipaintmod.xio')=1 then xiopath=''
else if EXISTS('/hhsxipaintmod.xio')=1 then xiopath='/'
else do
say "No hhsxipaintmod.xio found!"
'wait 5'
exit
end
xiopath'hhsxipaintmod.xio request ""'
'requestfile noicons title "Select source directory:" >ENV:HHsYUVAnimSource'
if rc~=0 then exit
'requestfile savemode noicons pattern ~(#?.info) title "Select animation file:" >ENV:HHsYUVAnimFile'
if rc~=0 then exit
'list $HHsYUVAnimSource pat ~(#?.info) files lformat %f%n >t:HHsAnimList'
'sort t:HHsAnimList to t:HHsAnimListS'
if (open(SourceList,'t:HHsAnimListS','READ')=0) then do
say "Can't read file list"
'wait 5'
exit
end
if (open(DestList,'ENV:HHsYUVAnimFile','READ')=0) then do
say "Can't read dest file name"
'wait 5'
exit
end
destanim=READLN(DestList)
destanim=SUBSTR(destanim,2,LENGTH(destanim)-2)
say "Creating animation:" destanim
last=""
DO FOREVER
sourcefile=READLN(SourceList)
if length(sourcefile)=0 then do
say "Finished."
'wait 5'
exit
end
say "Processing file" sourcefile
if last="" then xiopath'hhsxipaintmod.xio load name "'sourcefile'" xmax 360 ymax 310'
else xiopath'hhsxipaintmod.xio load name "'sourcefile'" project "'last'" xmax 360 ymax 310'
if rc~=0 then exit
last=$HHsXMProjName
xiopath'hhsxipaintmod.xio save name "'destanim'" project "'last'"'
if rc~=0 then exit
END